home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
news
/
suck-2.6
/
suck-2
/
suck-2.6.3
/
sample
/
put.news
< prev
next >
Wrap
Text File
|
1995-08-06
|
543b
|
36 lines
#!/bin/sh
# this is just a simple script to run the one line sed
# command to strip off the NNTP Posting Header that
# my ISP's newsfeed doesn't like.
# this could be written as a one liner
# sed -e CMD $1 > $2
#set -x
if [ $# -ne 2 ]; then
echo
echo "Usage `basename $0` infile outfile <RETURN>"
echo
exit -1
fi
SEDCMD="/^NNTP-Posting-Host/d"
OUTFILE=$2
INFILE=$1
if [ -f ${INFILE} ]; then
sed -e ${SEDCMD} ${INFILE} > ${OUTFILE}
if [ $? -ne 0 ]; then
echo "Error"
exit -1
fi
else
echo "$1 does not exist"
exit -1
fi